<template>
  <div class="clientOrderEdit">
    <!-- 自理服务工单编辑弹窗组件 -->
    <el-dialog
      :visible.sync="dialogVisible"
      :fullscreen="false"
      :close-on-click-modal="false"
      destroy-on-close
      width="70%"
      title="工单详情"
      :show-close="true"
      :before-close="closeDailog"
    >
      <!-- <ContentWrap> -->
      <List :column="3" sep="：" label-width="100">
        <ListItem label="工单编号" :value="formData.acceptedCode || '--'" />
        <ListItem label="受理日期" :value="formData.guaranteeDate || '--'" />
        <ListItem label="制单人" :value="formData.createrName || '--'" />
        <ListItem label="需求类型" :value="formData.demandTypeName || '--'" />
        <ListItem label="产品名称" :value="formData.productModel || '--'" />
        <ListItem label="顾客姓名" :value="formData.customerName || '--'" />
        <ListItem label="联系方式" :value="formData.customerTel || '--'" />
        <ListItem label="联保卡号" :value="formData.cardCode || '--'" />
        <ListItem label="顾客地址" :span="24" :value="`${formData.provinceName}${formData.cityName}${formData.address}${formData.countyName}${formData.streetName}` || '--'" />
        <ListItem label="维修技师" :value="formData.repairTeacherName || '--'" />
        <ListItem label="维修日期" :value="formData.repairDate || '--'" />
        <ListItem label="需求描述" :span="24" :value="formData.demandDesc || '--'" />
        <ListItem label="服务费" :value="formData.serviceCharge || '--'" />
        <ListItem label="处理结果" :value="formData.handleResultChina || '--'" />
        <ListItem label="完工日期" :value="formData.finishDate || '--'" />
      </List>
      <!-- </ContentWrap> -->
    </el-dialog>
  </div>
</template>
<script>
// import ContentWrap from '@/components/ContentWrap'
import { List, ListItem } from '@/components/List'
export default {
  name: 'ClientOrderEdit',
  components: {
    // ContentWrap,
    List,
    ListItem
  },
  props: {
    name: {
      type: String,
      default: ''
    },
    text: {
      type: String,
      default: '1'
    },
    type: {
      type: String,
      default: '1'
    }
  },
  data() {
    return {
      dialogVisible: false,
      loading: false,
      formData: {},
      formRules: {},
      selectedAry: []
    }
  },
  methods: {
    openDailog(data) {
      this.formData = data
      this.dialogVisible = true
    },
    closeDailog() {
      this.selectedAry = []
      this.dialogVisible = false
    },
    // 确定
    confrim() {
      this.$emit('confrim', this.formData)
      this.closeDailog()
    }
  }
}
</script>
<style lang='scss' scoped>
.buttons-center {
  display: flex;
  margin-bottom: 20px;
  i {
    flex-grow: 1;
  }
}
</style>
